<?php
	include('dbcon.php');
	if (!$con)
	{
		die('Could not connect: ' . mysql_error());
	}
	mysql_select_db(MYSQLDB, $con);
	$qry = "SELECT * FROM companyairports";
	$result = mysql_query($qry);
addDebug2($qry);
	//if (isset($result))
	//{
	for ($i=1;$i<30;$i++)
		echo '<br>';
	adddebug2('test - BEFORE LOOP count: ' . mysql_numrows($result));
	adddebug2('sql error: ' . mysql_error());
		while($row = mysql_fetch_array($result))
			{
			echo mysql_numrows($result) . ' row count <br>';
			adddebug2('in loop thing');
				//echo $row["name"] . ' - ' . $row["website"] . ' - ' . $row["paratrans"];
				echo '<br> testrow:<br>';
				while (list ($key, $val) = each($row))
				{
					$meta = mysql_fetch_field($result, $key);
					//echo $meta->name . ' -field name<br>';				
					echo 'name ' . $meta->name . ' val ' . $val . '<br>';
				}
				//foreach ($row as $value)
				//	echo $value;
				echo '<br>';
			}	
	//}
	mysql_close($con);	
?>